Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend metrics in the code base #684

Merged
merged 12 commits into from
Apr 22, 2024
Merged

Conversation

otherview
Copy link
Member

@otherview otherview commented Mar 25, 2024

Description

Adds metrics to other parts of the code. Based on https://github.com/vechain/protocol-board-repo/issues/119

  • Adds Gauge meter
  • Adds following metrics:
- block_bft_committed_count    [ finalized, proposed ]

- block_proposed_duration_ms   [ failed, proposed ]
- block_proposed_count         [ failed, proposed ]
- block_proposed_tx_count 
- block_received_duration_ms   [ failed, proposed ]
- block_received_count         [ failed, proposed ]
- block_received_processed_tx_count 

- chain_fork_count
- chain_fork_size

- p2p_connected_peers_count
- p2p_discovered_node_count
- p2p_dial_new_node_count

- txpool_current_tx_count [ remote, local ] [ total ]

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

No changes to current running code.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • New and existing E2E tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have not added any vulnerable dependencies to my code

@otherview otherview requested a review from a team as a code owner March 25, 2024 17:53
@otherview otherview marked this pull request as draft March 25, 2024 17:53
@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2024

Codecov Report

Attention: Patch coverage is 72.52747% with 75 lines in your changes are missing coverage. Please review.

Project coverage is 57.55%. Comparing base (e42227b) to head (6dd8cdf).
Report is 17 commits behind head on pedro/add_metrics.

❗ Current head 6dd8cdf differs from pull request most recent head 9735a3d. Consider uploading reports for the commit 9735a3d to get more accurate results

Files Patch % Lines
telemetry/prometheus.go 83.43% 18 Missing and 9 partials ⚠️
cmd/thor/node/node.go 0.00% 18 Missing ⚠️
cmd/thor/node/packer_loop.go 0.00% 18 Missing ⚠️
api/events/events.go 0.00% 3 Missing ⚠️
api/transfers/transfers.go 0.00% 3 Missing ⚠️
p2psrv/nodes.go 0.00% 2 Missing ⚠️
p2psrv/server.go 0.00% 2 Missing ⚠️
telemetry/telemetry.go 86.66% 2 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           pedro/add_metrics     #684      +/-   ##
=====================================================
+ Coverage              57.27%   57.55%   +0.27%     
=====================================================
  Files                    156      159       +3     
  Lines                  17218    17460     +242     
=====================================================
+ Hits                    9862    10049     +187     
- Misses                  6392     6438      +46     
- Partials                 964      973       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

api/doc/thor.yaml Outdated Show resolved Hide resolved
@otherview otherview changed the base branch from master to pedro/add_metrics March 26, 2024 14:27
otherview and others added 8 commits March 26, 2024 14:32
* feat: allow devs to publish images from branches

* feat: publshing docker images on master commits, pre-release, and release

* fix: typo

* Update .github/workflows/on-master-commit.yaml

Co-authored-by: Pedro Gomes <[email protected]>

* Update .github/workflows/on-master-commit.yaml

Co-authored-by: Pedro Gomes <[email protected]>

* fix: remove duplication

* chore: update actions versions

* feat: orchestract pull request CI from one file

* feat: orchestract pull request CI from one file

* fix: typos

* fix: remove requirement for test to pass before testing docker build

* Update .github/workflows/on-master-commit.yaml

Co-authored-by: libotony <[email protected]>

* Update .github/workflows/on-pre-release.yaml

Co-authored-by: libotony <[email protected]>

* chore: add linter to pre-master publish

* feat: throw an error for invalid release tag

* feat: throw an error for invalid release tag

* fix: publish only rc for pre-release"

* fix: pre-release regex

* fix: remove duplication

* feat: verify tags/releases

* fix: validate step

* chore: update to use ref_name instead of ref

* Update .github/workflows/on-release.yaml

Co-authored-by: libotony <[email protected]>

* Update .github/workflows/on-pull-request.yaml

Co-authored-by: libotony <[email protected]>

* chore: updates for PR comments

---------

Co-authored-by: Pedro Gomes <[email protected]>
Co-authored-by: libotony <[email protected]>
@otherview otherview marked this pull request as ready for review March 28, 2024 15:54
@otherview otherview requested a review from libotony March 28, 2024 15:54
@otherview otherview merged commit 06c6e78 into pedro/add_metrics Apr 22, 2024
2 checks passed
@otherview otherview deleted the pedro/add_metrics_2 branch April 22, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants